<?php
	$title="手机激活";
	require_once $_site->get_viewpath("wap/commom/header");
	$phone = request('phone',false,true);
	if(!is_mobile($phone)){
		$phone="";
	}
?>
<script type="text/javascript" charset="utf-8" src="/plugin/cooperation_unit/artdialog/jquery.artDialog.source.js?skin=default"></script>
<script type="text/javascript" language="javascript">
	loader.file({
		plugin:['validform/main','dialog/main'],
			js:['city_area', 'html','sms_send']
	});
	$(function (){
		var form_obj=$("#form1").Validform({
		   tiptype: function(msg, o, cssctl){
			   if(!o.obj.is("form")){
				   /*var obj = o.obj.parent("td").find('tt');
				   cssctl(obj, o.type);
				   obj.text(msg);*/
			   }
		   },
		   ajaxPost:true,
		   callback:function (data){
				var k =art.dialog({
					id:'id1',
					title:false,
					content:"<div>"+data.msg+"</div>",
					cancel:false,
					fixed:true,
					lock:true,
					close:function (){
						if(data.state){
							location.href="/wap/login";
						}
					}
				}).time(3);
		   }
		});

		$("#form1").find('[datatype]').live('focusin keyup blur change',function (e){
			var $this = $(this),lable = $this.parents('li').find('label');

			if(e.type === 'focusin'){

				if($this.val()==''){
					lable.css("color",'#999');
					$this.removeClass('Validform_error');
				}

			}
			if(e.type === 'change'){

				if($this.val()!=''){
					lable.hide().css("color",'#333');
				}else{
					lable.show().css("color",'#999');
				}

			}
			if(e.type === 'focusout'){
				if($this.val()==''){
					lable.show().css("color",'#333');
				}else{
					lable.hide();
				}

			}
			if(e.type === 'keyup'){
				if($this.val()!=''){
					lable.hide().css("color",'#333');
				}else{
					lable.show().css("color",'#999');
				}
				$this.removeClass('Validform_error');
			}

		});
	})
</script>
<style type="text/css">
	input.Validform_error{
		background: url("/static/images/error.png") no-repeat right center;
	}
	lable{color:#333;}
	div.aui_state_noTitle .aui_inner{
		 border:1px solid #efefef;
 background:-ms-linear-gradient(top,#f2f2f2 0,#FFF 100%);
			background:-moz-linear-gradient(top,#f2f2f2 0,#FFF 100%);
			background:-webkit-gradient(linear,left top,left bottom,color-stop(0,#E5E5E5),color-stop(1,#C3C3C3));
			filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#efefef', endColorstr='#fffff',GradientType=0);

			border-radius:5px;
			height:40px; line-height:32px;
	}
	div.aui_state_focus .aui_content{
		color:#333333;
		font-size:18px;

	}
	table.aui_border{
		box-shadow:none;
	}
</style>
<body style=" padding-bottom:80px;">
	<div class="top_one"><a href="/wap/index" class="arrow_carrot-left return"></a>手机激活</div>

	<div class="regist">
	<form id="form1" method="post" action="/handle.php">
	<input type="hidden" name="h" value="user/phone_activate">
		<ul>
			<li>
				<em class="em_one"><img src="/static/wap/img/regist_left.jpg" /></em>
				<em class="em_two"><img src="/static/wap/img/regist_right.jpg" /></em>
				<label>手机号</label>
				<input  name="mobile" id='mobile' datatype='m' nullmsg='请填写手机号' class="input_text" value="<?php echo $phone ;?>" type="text" />

			</li>
			<dt>
				<input class="input_bt" type="button" onclick='sms_send(this,2,<?php echo $_site->site_config['site']['sms_retry_time'] ;?>);return false;' value="获取验证码" /><span id='sms_msg'></span>
			</dt>
			<li>
				<em class="em_one"><img src="/static/wap/img/regist_left.jpg" /></em>
				<em class="em_two"><img src="/static/wap/img/regist_right.jpg" /></em>
				<label>短信验证码</label>
				<input name="sms_code" class="input_text" type="text" datatype='*6-20' errormsg='短信验证码' nullmsg='请填写短信验证码' value=""/>
			</li>
		</ul>


		<div class="zhuce"><input type="submit" value="提 交" /></div>
		<p class="p_one">已有激活？</p>
		<div class="dl"><input type="button" onclick="window.location.href='/wap/login'" value="登 录" /></div>
		</form>
	</div>
</body>
</html>
